package com.gosuncn.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


/***
 *功能描述
 * @author zxl
 * @date 2021/7/26
*/
@Controller
public class HomeController {




    /**
     *获取配置文件端口
    */
    @Value( "${server.port}")
    private  Integer api;



    /**
     * 获取端口信息
     * @return
     */
    @ResponseBody
    @GetMapping("/api/getPort")
    public Integer getPort() {
        return api;
    }


}
